package demo3;

public class TestDate {
    public static void main(String[] args) {
        Date date=new Date();
        //date.setData(2004,4,2);构造方法替代了set方法
        date.printData();
        Date date1=new Date();
        date1.setData(2005,4,2);
        date1.printData();
        Date date2=new Date();
        date2.setData(2006,4,2);
        date2.printData();

    }
}
